/* =========================================================
   dkLab filtrace + řazení — feature styles
   Extracted from VSE V93.css
   ========================================================= */

/* =========================================================
   Skryté filter sekce — neviditelné v UI, funkční přes URL
   ========================================================= */
.filter-section-parametric-id-113,
.filter-section-parametric-id-116,
.filter-section-parametric-id-119 {
  display: none !important;
}

/* =========================================================
   dkLab filtrace + řazení
   Base
   ========================================================= */

:root {
  --dklab-filter-bg: #ffffff;
  --dklab-filter-text: #1D1D1B;
  --dklab-filter-border: #d9d9d9;
  --dklab-filter-active: #D61118;
  --dklab-panel-bg: #fafafa;
  --dklab-toggle-border: #cccccc;
  --dklab-radius: 999px;
  --dklab-transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  --dklab-filters-show-filter-background-color: #ffffff;
  --dklab-filters-show-filter-foreground-color: #1D1D1B;
}

/* Celý filtrační blok jako jeden vizuálně ukotvený toolbar */
#dkLabTopFilters {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 16px 18px !important;
  background: var(--dklab-panel-bg) !important;
  border: 1px solid #ececec !important;
  border-radius: 12px !important;
  margin-bottom: 18px !important;
}

#dkLabTopFilters .filter-sections,
#dkLabTopFilters #filters {
  background: transparent !important;
}

/* Popisek nad řadou filtrů — nesmí být uvnitř #filters, rozbíjel by
   dkLab měření pro zarovnání druhého řádku chipů */
@media (min-width: 992px) {
  #dkLabTopFilters::before {
    content: "Filtrovat podle:";
    display: block;
    margin: 0 0 -2px 12px;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a8a8a;
  }
}

#dkLabTopFilters #filters {
  order: 1 !important;
  margin: 0 !important;
}

#dkLabTopFilters .slider-wrapper,
#dkLabTopFilters .filter-section {
  border: none !important;
}

#dkLabTopFilters h4 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  color: var(--dklab-filter-text) !important;
  background: var(--dklab-filter-bg) !important;
  border: 1px solid var(--dklab-filter-border) !important;
  border-radius: var(--dklab-radius) !important;
  padding: 7px 15px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: var(--dklab-transition), box-shadow 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(29, 29, 27, 0.05) !important;
}

#dkLabTopFilters h4::after {
  display: none !important;
}

#dkLabTopFilters .filter-section h4,
#dkLabTopFilters .slider-wrapper > h4 {
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

/* Hover decentně (černý obrys), plná červená jen pro otevřený chip */
#dkLabTopFilters h4:hover,
#dkLabTopFilters h4:focus,
#dkLabTopFilters h4:focus-visible {
  background: #ffffff !important;
  color: #1D1D1B !important;
  border-color: #1D1D1B !important;
  text-decoration: none !important;
}

#dkLabTopFilters h4:active {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
  text-decoration: none !important;
}

#dkLabTopFilters h4,
#dkLabTopFilters h4:hover,
#dkLabTopFilters h4:focus,
#dkLabTopFilters h4:focus-visible,
#dkLabTopFilters h4:active,
#dkLabTopFilters h4 *,
#dkLabTopFilters h4:hover *,
#dkLabTopFilters h4:focus *,
#dkLabTopFilters h4:focus-visible *,
#dkLabTopFilters h4:active * {
  text-decoration: none !important;
}

#dkLabTopFilters .filter-label {
  color: var(--dklab-filter-text) !important;
}

#dkLabTopFilters .filter-section.filter-section-count {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  clear: both !important;
  float: none !important;
  padding: 8px 12px 2px !important;
  margin: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

#dkLabTopFilters .filter-total-count,
#category-header.category-header--moved .filter-total-count {
  color: #1D1D1B !important;
}

#dkLabTopFilters .filter-section.filter-section-count .filter-total-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  margin-left: auto !important;
  text-align: right !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

.dkLab-filters-button__item,
.dkLab-filters-button__item.dkLab-filters-button__item--cancel,
#filter-pill-strip .filter-pill-btn,
#category-header.category-header--moved .listSorting__control {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  background: var(--dklab-filter-bg) !important;
  color: var(--dklab-filter-text) !important;
  border: 1px solid var(--dklab-filter-border) !important;
  border-radius: var(--dklab-radius) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: var(--dklab-transition) !important;
  text-decoration: none !important;
}

.dkLab-filters-button__item:hover,
.dkLab-filters-button__item.dkLab-filters-button__item--cancel:hover,
#filter-pill-strip .filter-pill-btn:hover,
#category-header.category-header--moved .listSorting__control:not([aria-disabled="true"]):hover {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
}

#category-header.category-header--moved .listSorting__control--current,
#category-header.category-header--moved .listSorting__control[aria-disabled="true"] {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
  cursor: default !important;
}

/* Aktivní filtry — červeně tónované pilulky, ať jsou vidět na první pohled */
#filter-pill-strip .filter-pill-btn,
#filter-pill-strip .filter-pill-btn.filter-pill--active,
.dkLab-filters-button__item {
  background: #FBEAEB !important;
  color: var(--dklab-filter-active) !important;
  border-color: rgba(214, 17, 24, 0.35) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
}

.dkLab-filters-button__item:hover,
.dkLab-filters-button__item.dkLab-filters-button__item--cancel:hover {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
}

.dkLab-filters-button__in {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
}

.dkLab-filters-button {
  margin: 10px 0 4px !important;
}

#filter-pill-strip .filter-pill-btn.filter-pill--active:hover {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
  text-decoration: none !important;
}

#filter-pill-strip .filter-pill-btn,
#filter-pill-strip .filter-pill-btn:hover,
#filter-pill-strip .filter-pill-btn:focus,
#filter-pill-strip .filter-pill-btn:active,
#filter-pill-strip .filter-pill-btn.filter-pill--active,
#filter-pill-strip .filter-pill-btn *,
#filter-pill-strip .filter-pill-btn:hover *,
#filter-pill-strip .filter-pill-btn:focus *,
#filter-pill-strip .filter-pill-btn:active *,
#filter-pill-strip .filter-pill-btn.filter-pill--active *,
#category-header.category-header--moved .listSorting__control,
#category-header.category-header--moved .listSorting__control:hover,
#category-header.category-header--moved .listSorting__control:focus,
#category-header.category-header--moved .listSorting__control:active,
#category-header.category-header--moved .listSorting__control--current,
#category-header.category-header--moved .listSorting__control[aria-disabled="true"],
#category-header.category-header--moved .listSorting__control *,
#category-header.category-header--moved .listSorting__control:hover *,
#category-header.category-header--moved .listSorting__control:focus *,
#category-header.category-header--moved .listSorting__control:active *,
#category-header.category-header--moved .listSorting__control--current *,
#category-header.category-header--moved .listSorting__control[aria-disabled="true"] * {
  text-decoration: none !important;
}

#filter-pill-strip .filter-pill-btn:focus,
#filter-pill-strip .filter-pill-btn:focus-visible,
#filter-pill-strip .filter-pill-btn:active,
#category-header.category-header--moved .listSorting__control:focus,
#category-header.category-header--moved .listSorting__control:focus-visible,
#category-header.category-header--moved .listSorting__control:active {
  text-decoration: none !important;
}

#category-header.category-header--moved .listSorting__control:hover,
#category-header.category-header--moved .listSorting__control:focus,
#category-header.category-header--moved .listSorting__control:focus-visible,
#category-header.category-header--moved .listSorting__control:active {
  color: #ffffff !important;
}

#filter-pill-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
  border: none !important;
  padding: 2px 0 0 !important;
  box-sizing: border-box !important;
  margin-bottom: 0 !important;
}

/* pouze na desktopu — JS přesun běží jen od 992px */
@media (min-width: 992px) {
  #category-header {
    top: -26px !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
}

#category-header.category-header--moved {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
  padding: 12px 0 0 !important;
  border: none !important;
  border-top: 1px solid #e9e9e9 !important;
  box-sizing: border-box !important;
}

/* Proxy počtu položek — absolutně pozicovaný, nezasahuje do flex layoutu řazení */
#category-header.category-header--moved .filter-count-proxy {
  position: absolute !important;
  right: 30px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  color: #1D1D1B !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

#category-header.category-header--moved .filter-count-proxy strong {
  color: var(--dklab-filter-active) !important;
  font-weight: 700 !important;
}

.filter-count-proxy.is-hidden {
  display: none !important;
}

/* Skrýt originál jen když je proxy připravená a jen na desktopu */
@media (min-width: 992px) {
  #dkLabTopFilters.filter-count-proxy-ready #filters .filter-section.filter-section-count {
    display: none !important;
  }
}

#category-header.category-header--moved::after {
  display: none !important;
}

#category-header.category-header--moved .listSorting--dropdown {
  display: block !important;
  position: static !important;
  width: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  z-index: auto !important;
  right: auto !important;
  left: auto !important;
  padding-left: 12px !important;
}

#category-header.category-header--moved .sortingToggle,
#category-header.category-header--moved .listSorting__label {
  display: none !important;
}

/* Popisek před řazením — stejný styl jako "Filtrovat podle:"
   (dvojité ID kvůli cizímu border pravidlu s vyšší specificitou) */
#dkLabTopFilters #category-header.category-header--moved .span--sort,
#category-header.category-header--moved .span--sort {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  margin-left: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #8a8a8a !important;
  white-space: nowrap !important;
}

#category-header.category-header--moved #listSortingControls {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  position: static !important;
  width: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#category-header.category-header--moved .listSorting__control {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
}

#category-header.category-header--moved .filter-total-count {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-align: right !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

#dkLabTopFilters .filter-section.filter-section-count .filter-total-count strong,
#category-header.category-header--moved .filter-total-count strong {
  color: var(--dklab-filter-active) !important;
  font-weight: 700 !important;
}

/* Skrytí levého postranního panelu (nahrazen top filtry) – mimo košík */
body:not(.in-kosik) aside.sidebar.sidebar-left[data-testid="sidebarMenu"] {
  display: none !important;
}

/* Zobrazit sidebar na checkout stránkách (in-krok-1, in-krok-2) na desktopu/tabletu */
@media (min-width: 768px) {
  body.in-krok-1 aside.sidebar.sidebar-left[data-testid="sidebarMenu"],
  body.in-krok-2 aside.sidebar.sidebar-left[data-testid="sidebarMenu"] {
    display: block !important;
  }
}

/* === Skrýt itemsTotal ("112 položek celkem") === */
#dkLabTopFilters .itemsTotal { display: none !important; }

/* skryj původní text a zobraz náhradní */
#dkLabTopFilters .filter-sections h4.symptom span { font-size: 0; }
#dkLabTopFilters .filter-sections h4.symptom span::before {
  content: "Dostupnost";
  font-size: 13px;
}

/* =========================================================
   "Další filtry" toggle + loading stav chipu (třídy řídí dkfilter.js)
   ========================================================= */
@media (min-width: 992px) {
  #dkLabTopFilters .filter-section.br-filter-extra {
    display: none !important;
  }

  #dkLabTopFilters.br-filters-expanded .filter-section.br-filter-extra {
    display: block !important;
  }

  /* Toggle chip — odlišený šedě, ať nesplývá s reálnými filtry */
  #dkLabTopFilters .br-more-filters > h4 {
    background: transparent !important;
    border-style: dashed !important;
    color: #6f6f6f !important;
    box-shadow: none !important;
  }

  #dkLabTopFilters .br-more-filters > h4:hover {
    border-color: #1D1D1B !important;
    color: #1D1D1B !important;
  }
}

/* Pulz na chipu, dokud dkLab načítá přefiltrovaný výpis */
@keyframes brFilterPulse {
  50% { opacity: 0.4; }
}

#dkLabTopFilters .filter-section.br-loading > h4,
#dkLabTopFilters .slider-wrapper.br-loading > h4 {
  animation: brFilterPulse 0.9s ease-in-out infinite;
}

/* =========================================================
   Redesign popupů filtrů (otevřená sekce = .filter-section.active > form)
   Reveal řídí dkLab CDN css — tady jen vzhled.
   ========================================================= */

/* Panel */
#dkLabTopFilters .filter-section.active > form,
#dkLabTopFilters .filter-section.active > .param-filter-top,
#dkLabTopFilters .filter-section > .dkLab-slider-wrapper,
#dkLabTopFilters > #filters > .slider-wrapper .dkLab-slider-wrapper {
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 28px rgba(29, 29, 27, 0.16) !important;
}

#dkLabTopFilters .filter-section.active > form,
#dkLabTopFilters .filter-section.active > .param-filter-top {
  min-width: 300px !important;
  max-height: 340px !important;
  padding: 6px !important;
  margin-top: 6px !important;
  overscroll-behavior: contain;
}

/* Tenký scrollbar v popupu */
#dkLabTopFilters .filter-section.active > form::-webkit-scrollbar {
  width: 6px;
}

#dkLabTopFilters .filter-section.active > form::-webkit-scrollbar-thumb {
  background: rgba(29, 29, 27, 0.25);
  border-radius: 999px;
}

#dkLabTopFilters .filter-section.active > form::-webkit-scrollbar-track {
  background: transparent;
}

/* Řádek volby: celý klikací label, hover podbarvení, počet vpravo */
#dkLabTopFilters .filter-section form fieldset > div {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
}

#dkLabTopFilters .filter-section form fieldset > div > input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#dkLabTopFilters .filter-section form fieldset > div > .filter-label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  padding: 9px 10px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  transition: background-color 0.12s ease !important;
}

#dkLabTopFilters .filter-section form fieldset > div > .filter-label:hover {
  background: #f5f5f5 !important;
}

/* Vlastní checkbox — čtvereček před textem */
#dkLabTopFilters .filter-section form fieldset > div > .filter-label::before {
  content: "" !important;
  /* dkLab css dává checkbox pseudu position:absolute;left:0 → překrývá text */
  position: static !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #c7c7c7 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transform: none !important;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

#dkLabTopFilters .filter-section form fieldset > div:has(input:checked) > .filter-label::before {
  background: #D61118 no-repeat center /
    12px url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M3 8.5l3.2 3.2L13 5"/></svg>') !important;
  border-color: #D61118 !important;
}

#dkLabTopFilters .filter-section form fieldset > div:has(input:checked) > .filter-label {
  font-weight: 700 !important;
}

/* dkLab css kreslí vlastní checked indikátor přes label::after (absolute,
   vlevo mimo řádek) — náš checkbox je ::before, jejich ::after vypnout */
#dkLabTopFilters .filter-section form fieldset > div > .filter-label::after {
  content: none !important;
  display: none !important;
}

/* Počet položek — decentní pilulka vpravo */
#dkLabTopFilters .filter-section .filter-label .filter-count {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  background: #f1f1f1 !important;
  color: #6f6f6f !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  min-width: unset !important;
  width: auto !important;
  height: auto !important;
}

/* Barevné volby (Barva) — řádek: kolečko + název + počet */
#dkLabTopFilters .filter-section form .advanced-filters-wrapper {
  display: block !important;
  padding: 0 !important;
}

#dkLabTopFilters .filter-section form .advanced-filters-wrapper > div {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 0 0 0 10px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  transition: background-color 0.12s ease !important;
}

#dkLabTopFilters .filter-section form .advanced-filters-wrapper > div:hover {
  background: #f5f5f5 !important;
}

#dkLabTopFilters .filter-section form .advanced-filters-wrapper > div > .filter-label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  padding: 9px 10px 9px 8px !important;
  margin: 0 !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
}

#dkLabTopFilters .filter-section form .advanced-filters-wrapper > div:has(input:checked) > .filter-label {
  font-weight: 700 !important;
}

#dkLabTopFilters .filter-section .advanced-parameter {
  display: block !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #d5d5d5 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: box-shadow 0.12s ease !important;
}

#dkLabTopFilters .filter-section form .advanced-filters-wrapper > div:has(input:checked) .advanced-parameter {
  box-shadow: 0 0 0 2px #D61118 !important;
  border-color: #ffffff !important;
}

#dkLabTopFilters .filter-section .advanced-parameter-inner {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

#dkLabTopFilters .filter-section .advanced-parameter-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Slider popupy (Cena, Příkon, …) */
#dkLabTopFilters .dkLab-slider-wrapper {
  padding: 16px 18px !important;
  min-width: 270px !important;
}

#dkLabTopFilters .slider-header {
  display: flex !important;
  justify-content: space-between !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1D1D1B !important;
  margin-bottom: 10px !important;
}

/* jQuery UI slider v brand barvách */
#dkLabTopFilters .ui-slider {
  height: 4px !important;
  background: #e6e6e6 !important;
  border: none !important;
  border-radius: 999px !important;
  margin: 8px 8px 6px !important;
}

#dkLabTopFilters .ui-slider .ui-slider-range {
  background: #D61118 !important;
  border: none !important;
  border-radius: 999px !important;
}

#dkLabTopFilters .ui-slider .ui-slider-handle {
  width: 18px !important;
  height: 18px !important;
  top: -7px !important;
  margin-left: -9px !important;
  background: #ffffff !important;
  border: 2px solid #1D1D1B !important;
  border-radius: 50% !important;
  cursor: grab !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease !important;
}

#dkLabTopFilters .ui-slider .ui-slider-handle:hover,
#dkLabTopFilters .ui-slider .ui-slider-handle:focus,
#dkLabTopFilters .ui-slider .ui-slider-handle.ui-state-active {
  border-color: #D61118 !important;
  box-shadow: 0 0 0 4px rgba(214, 17, 24, 0.15) !important;
  outline: none !important;
}

/* Chip s aktivním výběrem — dkLab sám přidává třídu .checked na sekci */
#dkLabTopFilters .filter-section.checked > h4,
#dkLabTopFilters .slider-wrapper.checked > h4 {
  border-color: var(--dklab-filter-active) !important;
  color: var(--dklab-filter-active) !important;
  font-weight: 700 !important;
  position: relative !important;
  overflow: visible !important;
}

/* Notifikační tečka v rohu chipu — absolute, neovlivní šířku chipu
   (dkLab drží chipy na pevné šířce) */
#dkLabTopFilters .filter-section.checked > h4::after,
#dkLabTopFilters .slider-wrapper.checked > h4::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: -3px !important;
  right: 4px !important;
  width: 12px !important;
  height: 12px !important;
  background: var(--dklab-filter-active) !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
}

/* Aktivní (rozkliknutý) chip drží zvýraznění, dokud je popup otevřený */
#dkLabTopFilters .filter-section.active > h4,
#dkLabTopFilters .slider-wrapper.active > h4 {
  background: var(--dklab-filter-active) !important;
  color: #ffffff !important;
  border-color: var(--dklab-filter-active) !important;
}

#dkLabTopFilters .filter-section.active.checked > h4 {
  color: #ffffff !important;
}

/* =========================================================
   dkLab filtrace + řazení
   Mobile <= 767px
   ========================================================= */
@media (max-width: 767px) {

  /* Jednotné full-width chipy — slider i checkbox sekce stejně */
  #dkLabTopFilters #filters h4 {
    width: 100% !important;
    justify-content: flex-start !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
  }

  #dkLabTopFilters .dkLab-filters-pack-button {
    display: block !important;
    position: static !important;
    order: 1 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  #dkLabTopFilters .dkLab-filters-pack-button .btn.btn-primary {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
    background-color: var(--dklab-panel-bg) !important;
    color: #1D1D1B !important;
    border: 2px solid var(--dklab-toggle-border) !important;
    border-radius: 4px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  #category-header {
    order: 2 !important;
    width: 100% !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  #category-header::after {
    display: none !important;
    content: none !important;
  }

  #dkLabTopFilters #filters {
    order: 3 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #dkLabTopFilters #filters.visible {
    height: auto !important;
    overflow: visible !important;
  }

  #filter-pill-strip {
    display: none !important;
  }

  #category-header .span--sort {
    display: none !important;
  }

  #category-header .listSorting--dropdown {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  #category-header .sortingToggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 44px !important;
    background-color: var(--dklab-panel-bg) !important;
    border: 2px solid var(--dklab-toggle-border) !important;
    color: #1D1D1B !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 10px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  #category-header .sortingToggle .icon-sort,
  #category-header .sortingToggle .icon-chevron-down,
  #category-header .sortingToggle [class*="icon"],
  #category-header .sortingToggle .sortingToggle__label,
  #category-header .sortingToggle .sortingToggle__value {
    display: none !important;
  }

  #category-header .sortingToggle::before {
    content: "Seřadit dle";
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #1D1D1B;
  }

  #category-header .sortingToggle::after,
  #category-header .sortingToggle .icon-chevron-down::before,
  #category-header .sortingToggle .icon-chevron-down::after {
    display: none !important;
    content: none !important;
  }

  #category-header #listSortingControls {
    display: none !important;
  }

  #category-header .listSorting--open #listSortingControls {
    display: flex !important;
    flex-direction: column !important;
    background: #ebebeb !important;
    border-radius: 0 0 4px 4px !important;
    padding: 4px 0 !important;
  }

  #category-header .listSorting--open .listSorting__control {
    background: transparent !important;
    border: none !important;
    color: #1D1D1B !important;
    padding: 10px 20px !important;
    text-align: left !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    width: 100% !important;
    cursor: pointer !important;
  }

  #category-header .listSorting--open .listSorting__control--current,
  #category-header .listSorting--open .listSorting__control[aria-disabled="true"] {
    color: #D61118 !important;
    font-weight: 600 !important;
  }

}

/* =========================================================
   dkLab filtrace + řazení
   Desktop / tablet >= 768px
   ========================================================= */
@media (min-width: 768px) {
  #dkLabTopFilters .dkLab-filters-pack-button {
    display: none !important;
  }

  #dkLabTopFilters #filters {
    height: auto !important;
    overflow: visible !important;
    order: 1 !important;
    padding: 0 !important;
  }

  #dkLabTopFilters #category-header {
    order: 3 !important;
  }
}

/* =========================================================
   Tablet 768px–991px — #category-header reset z absolutní
   pozice (Shoptet default) do normálního flow
   ========================================================= */
@media (min-width: 768px) and (max-width: 991px) {
  #category-header {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
    display: block !important;
  }

  #category-header::after {
    display: none !important;
    content: none !important;
  }
}

/* Zarovnání levého okraje filtrovací řady se sort řadou na desktopu
   +12px = padding-left na .listSorting--dropdown (obě řady začínají na stejné ose) */
@media (min-width: 992px) {
  .dkLab-filters-button__in {
    padding-left: 12px !important;
  }

  #dkLabTopFilters {
    position: relative !important;
  }

  body:not(.in-kosik) #content-wrapper.aside-indented,
  body:not(.in-kosik) #content-wrapper .content-wrapper-in.sidebar-indented {
    padding-left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #dkLabTopFilters #filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: max-content !important;
    max-width: calc(100% - 24px) !important;
    margin-left: 12px !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #dkLabTopFilters #filters > .slider-wrapper,
  #dkLabTopFilters #filters > .filter-sections,
  #dkLabTopFilters #filters > #price-filter-form,
  #dkLabTopFilters #filters > .filter-section {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
  }

  #dkLabTopFilters #filters > #price-filter-form {
    display: none !important;
  }

  #dkLabTopFilters #filters > .filter-sections {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #dkLabTopFilters #filters > .filter-sections > #category-filter-hover {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: translateX(var(--dklab-hover-translate, 0px));
    pointer-events: none !important;
    position: relative !important;
    z-index: 2 !important;
  }

  #dkLabTopFilters #filters > .filter-sections > #category-filter-hover > * {
    pointer-events: auto !important;
  }

  /* Neviditelný spacer drží row 1 items na správné pozici po posunu kontejneru doleva */
  #dkLabTopFilters #filters > .filter-sections > #category-filter-hover::before {
    content: '';
    flex: 0 0 var(--dklab-hover-spacer, 0px);
    height: 0;
    pointer-events: none;
  }

  #dkLabTopFilters #filters > .filter-sections > .filter-section,
  #dkLabTopFilters #filters > .filter-sections > #category-filter-hover > .filter-section {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
  }

  #category-header.category-header--moved {
    padding-right: 260px !important;
  }

  #category-header.category-header--moved .listSorting--dropdown {
    width: 100% !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  #category-header.category-header--moved #listSortingControls {
    flex-wrap: nowrap !important;
    width: 100% !important;
  }
}

/* ============================================================
   Rychlé filtry, aktivní pilulky, sticky lišta, mobilní drawer
   ============================================================ */

/* --- Rychlé filtry (jeden klik, vzor Alza/T-LED) --- */
.br-quick-filters {
  display: none;
}

@media (min-width: 992px) {
  .br-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* 12px vlevo = společná osa s #filters, řazením a pilulkami filtrů */
    margin: 0 12px 12px;
  }

  .br-quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1D1D1B;
    background: #FFFFFF;
    border: 1px solid var(--dklab-filter-border, #d9d9d9);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
  }

  .br-quick-chip::before {
    content: "+";
    font-weight: 700;
    line-height: 1;
  }

  .br-quick-chip:hover {
    border-color: #1D1D1B;
  }

  .br-quick-chip--on {
    background: #D61118;
    border-color: #D61118;
    color: #FFFFFF;
  }

  .br-quick-chip--on::before {
    content: "✓";
  }

  .br-quick-chip.br-loading {
    animation: brFilterPulse 0.9s ease-in-out infinite;
  }
}

/* --- Aktivní filtry: viditelný křížek + odlišené "Zrušit filtry" --- */
.dkLab-filters-button--remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  cursor: pointer;
}

.dkLab-filters-button--remove::before {
  content: "✕";
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.dkLab-filters-button__item.dkLab-filters-button__item--cancel {
  background: #1D1D1B !important;
  border-color: #1D1D1B !important;
  color: #FFFFFF !important;
  cursor: pointer;
}

.dkLab-filters-button__item.dkLab-filters-button__item--cancel:hover {
  background: #D61118 !important;
  border-color: #D61118 !important;
}

/* --- Sticky lišta: negativní top schová horní řádky, řazení zůstane --- */
@media (min-width: 992px) {
  #dkLabTopFilters {
    position: sticky !important;
    top: var(--br-sticky-top, -130px) !important;
    z-index: 60 !important;
  }

  /* otevřený popup filtru potřebuje být nad kartami produktů */
  #dkLabTopFilters .filter-section.active {
    z-index: 61;
  }
}

/* --- Mobilní drawer (vzor Alza) --- */
/* !important — button dědí display z cizích theme stylů */
@media (min-width: 992px) {
  .br-filter-open-btn,
  .br-drawer-head,
  .br-drawer-foot {
    display: none !important;
  }
}

.br-drawer-head,
.br-drawer-foot {
  display: none;
}

@media (max-width: 991px) {
  .br-filter-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin: 0 0 16px;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    background: #1D1D1B;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
  }

  .br-filter-open-btn::before {
    content: "";
    width: 18px;
    height: 18px;
    background-color: #FFFFFF;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="M3 5h18M6 12h12M10 19h4"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="M3 5h18M6 12h12M10 19h4"/></svg>') center / contain no-repeat;
  }

  /* Toolbar je schovaný, zobrazí se jen jako fullscreen drawer */
  body.type-category #dkLabTopFilters {
    display: none !important;
  }

  body.type-category.br-drawer-open #dkLabTopFilters {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.br-drawer-open {
    overflow: hidden !important;
  }

  body.br-drawer-open .br-drawer-head {
    order: -1; /* dkLab při přerenderu přeskládává children — pořadí drží flex */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 16px;
    background: #1D1D1B;
    color: #FFFFFF;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
  }

  body.br-drawer-open .br-drawer-close {
    background: none;
    border: 0;
    color: #FFFFFF;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
  }

  body.br-drawer-open #dkLabTopFilters > #category-filter-hover,
  body.br-drawer-open #dkLabTopFilters > #filters {
    padding: 16px;
  }

  /* dkLab na mobilu schovává #filters za vlastní toggle "Zobrazit filtry" —
     v draweru chceme filtry rovnou a toggle je zbytečný */
  body.br-drawer-open #dkLabTopFilters > #filters {
    display: block !important;
  }

  body.br-drawer-open #dkLabTopFilters .dkLab-filters-pack-button {
    display: none !important;
  }

  /* V draweru se otevřené sekce rozbalují inline (akordeon), ne jako
     plovoucí desktopový popup */
  body.br-drawer-open #dkLabTopFilters .filter-section.active > form,
  body.br-drawer-open #dkLabTopFilters .filter-section.active > .param-filter-top,
  body.br-drawer-open #dkLabTopFilters .filter-section > .dkLab-slider-wrapper,
  body.br-drawer-open #dkLabTopFilters > #filters > .slider-wrapper .dkLab-slider-wrapper {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 1px solid #e8e8e8 !important;
    border-top: 0 !important;
    border-radius: 0 0 10px 10px !important;
    margin: -6px 0 10px !important;
  }

  body.br-drawer-open #dkLabTopFilters > #category-header {
    padding: 12px 16px 0;
  }

  body.br-drawer-open .br-drawer-foot {
    order: 99; /* viz .br-drawer-head */
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    border-top: 1px solid #ececec;
  }

  body.br-drawer-open .br-drawer-apply {
    width: 100%;
    padding: 14px 16px;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    background: #D61118;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
  }
}
